/* Lambdas versus Binders */
#include <iostream>
#include <functional>
using namespace std;

int lambda1()
{
	auto plus10 = [](int i) {
		return i + 10;
	};
	cout << "+10:	" << plus10(7) << endl;

	auto plus10times2 = [](int i) {
		return (i + 10) * 2;
	};
	cout << "+10 *2:	" << plus10times2(7) << endl;

	auto pow3 = [](int i) {
		return i*i*i;
	};
	cout << "x*x*x:		" << pow3(7) << endl;

	std::function<double(double, double)> inversDivide = [](double d1, double d2) {
		return d2 / d1;
	};
	cout << "invidiv: " << inversDivide(49, 7) << endl;

	return 0;
}